Next | Prev | Up | Top | Contents | Index

Removing and Mounting a Plex

Caution: The procedure in this section can result in the loss of data if it is not performed properly. It is recommended only for experienced IRIX system administrators. You can get a snapshot of a filesystem by removing a plex from a plexed volume and mounting that plex separately. Since you can only mount volumes, you must convert the plex into a volume. The following procedure shows you how to remove the plex from its original volume and make it into a separate volume:

  1. Verify that the volume is currently not being revived. If there is a revive in progress, you should wait until the revive is done because the data among the plexes is not identical until after the plex revive is done.
# ps -ef | grep xlv_plexd
    root    35     1  0   Dec 13 ?        0:00 /sbin/xlv_plexd -m 4 

The output shows that just one copy of xlv_plexd, the master process, is running. If more than one copy is running, a plex revive is in progress.

  1. Unmount the filesystem mounted on the logical volume, /projvol5 in this example:

    # umount /projvol5

    Unmounting the filesystem puts it into a clean state.

  2. Start xlv_mgr and display the logical volume, xfs-mp5 in this example:

    # xlv_mgr

    xlv_mgr> show object xfs-mp5

    VOL xfs-mp5 (complete)

    VE xfs-mp5.log.0.0 [active]

    start=0, end=8255, (cat)grp_size=1

    /dev/dsk/dks1d2s15 (8256 blks)

    VE xfs-mp5.log.1.0 [active]

    start=0, end=8255, (cat)grp_size=1

    /dev/dsk/dks1d3s15 (8256 blks)

    VE xfs-mp5.data.0.0 [active]

    start=0, end=3920223, (cat)grp_size=1

    /dev/dsk/dks1d2s7 (3920224 blks)

    VE xfs-mp5.data.0.1 [active]

    start=3920224, end=7848703, (cat)grp_size=1

    /dev/dsk/dks1d4s7 (3928480 blks)

    VE xfs-mp5.data.1.0 [active]

    start=0, end=3920223, (cat)grp_size=1

    /dev/dsk/dks1d3s7 (3920224 blks)

    VE xfs-mp5.data.1.1 [active]

    start=3920224, end=7848703, (cat)grp_size=1

    /dev/dsk/dks1d5s7 (3928480 blks)

  3. Detach the second plex from the log subvolume and call it log_copy:

    xlv_mgr> detach plex xfs-mp5.log.1 log_copy

    One of the plexes from the log subvolume must be detached because the volume that will be created with one of the data plexes must have a log subvolume to go with it.

  4. Detach the second plex from the data subvolume and call it data_copy:

    xlv_mgr> detach plex xfs-mp5.data.1 data_copy

  5. Display all of the high-level objects to verify that there are now one volume and two plexes:

    xlv_mgr> show all

    Volume: xfs-mp5 (complete)

    Plex: log_copy

    Plex: data_copy

  6. Give the delete command for each of the detached plexes:

    xlv_mgr> delete object log_copy

    Object log_copy deleted.

    xlv_mgr> delete object data_copy

    Object data_copy deleted.

    The delete command changes the logical volume information in the volume headers, but doesn't touch the data in the partitions.

  7. Exit xlv_mgr:

    xlv_mgr> quit

  8. Make the partitions from the detached plexes into a volume:

    # xlv_make

    xlv_make> vol copy

    copy

    xlv_make> log

    copy.log

    xlv_make> ve dks1d3s15

    copy.log.0.0

    xlv_make> data

    copy.data

    xlv_make> ve dks1d3s7

    copy.data.0.0

    xlv_make> ve dks1d5s7

    copy.data.0.1

    xlv_make> end

    Object specification completed

    xlv_make> exit

    Newly created objects will be written to disk.

    Is this what you want?(yes) yes

    Invoking xlv_assemble

  9. Mount the new volume. The filesystem is still intact, so mkfs isn't used (using mkfs would erase the data).

    # mkdir /copy

    # mount /dev/dsk/xlv/copy /copy

  10. Remount the original filesystem:

    # mount /dev/dsk/xlv/xfs-mp5 /projvol5

  11. Use the ls command to confirm that the files on the original volume also appear on the new volume that you created from the removed plex.

    # ls /copy

    autoconfig chroot config cron.d

    chkconfig clri cron fstab

    # ls /projvol5

    autoconfig chroot config cron.d

    chkconfig clri cron fstab



Next | Prev | Up | Top | Contents | Index